<template>
  <div>
    <div class="padding-mod">
      <sh-btn type="default" @tap="show">
        默认
      </sh-btn>
    </div>
    <div class="padding-mod">
      <sh-btn type="primary" @tap="success">
        成功
      </sh-btn>
    </div>
    <div class="padding-mod">
      <sh-btn type="danger" @tap="fail">
        失败
      </sh-btn>
    </div>
    <div class="padding-mod">
      <sh-btn type="default" @tap="loading">
        加载中
      </sh-btn>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
      }
    },
    beforeMount() {
    },
    mounted() {

    },
    methods: {
      show(){
        this.$toast.show('多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字多行文字');
      },
      success(){
        this.$toast.success();
      },
      fail(){
        this.$toast.fail();
      },
      loading(){
        this.$toast.loading();
        window.setTimeout(()=>{
//          this.$toast.success();
           this.$toast.close();
        },1000);
      }
    }
  }
</script>

<style lang="scss" scoped>
  @import "../../assets/css/utils";
  .padding-mod {
    padding: 0.5rem;
  }
</style>
